
Page({
  data: {
    imgArr: [
      'http://m.qpic.cn/psc?/V51688fg1vRc9q3n3omH2cRMjT2afHy4/45NBuzDIW489QBoVep5mcdE*SNpz01fHDWEj*Obzz4528FZX4JDCObvUc8GwzRu7UjAFbgRJP9ywOr524vnDX8aWGRAGsNVpAQLmL.6jYHQ!/b&bo=sAT8ArAE*AIBJwA!&rf=viewer_4&t=5',
      'http://m.qpic.cn/psc?/V51688fg1vRc9q3n3omH2cRMjT2afHy4/45NBuzDIW489QBoVep5mcXrf.CLSmGiuHmJj8cDLUS8XNCnMuzduip0nHhXWZph5nVk0qctFcpWsFv*Pr3u4Iqomtv3QIItS2qsn.qttwM8!/b&bo=VQOAAlUDgAIBFzA!&rf=viewer_4&t=5'
    ],
    imgArr1: [
      'http://m.qpic.cn/psc?/V51688fg1vRc9q3n3omH2cRMjT2afHy4/ruAMsa53pVQWN7FLK88i5mUtN1YjE4uB4cRR4GyVcSXCq.GUFCu9Ck0q4zrpq15FdMZ534FVt.E89Cgfi4M6qcKZitvtQsYUIH2jgJKt1.4!/b&bo=gALVAoAC1QIBByA!&rf=viewer_4&t=5'
    ],
    markers: [{
      iconPath: "/resources/others.png",
      id: 0,
      latitude: 23.099994,
      longitude: 113.324520,
      width: 50,
      height: 50
    }],
    polyline: [{
      points: [{
        longitude: 35.999785,
        latitude: 104.24429
      }, {
          longitude: 35.999785,
          latitude: 104.24429
      }],
      color: "#FF0000DD",
      width: 2,
      dottedLine: true
    }],
    controls: [{
      id: 1,
      clickable: true
    }],
    active: 0,
  },
  onLoad: function (options) {

  },
  
  previewImg: function (e) {
    var imgUrl = e.currentTarget.dataset.src; //获取当前点击的图片
    var imgArr = this.data.imgArr;
    wx.previewImage({
      current: imgUrl, //当前图片地址
      urls: imgArr,  //所有要预览的图片的地址集合数组形式
      urls: [imgUrl], //一张图写法
      success: function (res) { },
      fail: function (res) { },
      complete: function (res) { },
    })
  },
  previewImg1: function (e) {
    var imgUrl1 = e.currentTarget.dataset.src; //获取当前点击的图片
    var imgArr1 = this.data.imgArr1;
    wx.previewImage({
      current: imgUrl1, //当前图片地址
      urls: imgArr1,  //所有要预览的图片的地址集合数组形式
      urls: [imgUrl1], //一张图写法
    })
  }
})